<%@page language="java"%>
<%@page contentType="text/html"%>
<%@page import="java.util.*, descriptor.*"%>

<jsp:include page="admin_generic_pre.jsp" >
	<jsp:param name="pagesubtitle" value="Create/Update a Career" />
</jsp:include>

	<p>
		<jsp:useBean id="infos" class="java.lang.String" scope="request" />
		<%= infos %>
	</p>
	<p>
		<jsp:useBean id="career" class="descriptor.CareerDescriptor" scope="request" />
		<form method="POST" action="admin">
			<table>
				<tr><td>Firstname</td><td><input type="text" name="firstname" value="<%= career.getFirstName() %>" /></td></tr>
				<tr><td>Name: </td><td><input type="text" name="surname" value="<%= career.getName() %>" /></td></tr>
				<tr><td>Login: </td><td><input type="text" name="login" value="<%= career.getLogin() %>" /></td></tr>
				<% if (career.getUserId() == 0){ %>
				<tr><td>Password: </td><td><input type="password" name="password" value="" /></td></tr>
				<tr><td>Confirm password: </td><td><input type="password" name="passwordbis" value="" /></td></tr>
				<%}%>
				<tr><td>Email: </td><td><input type="text" name="email" value="<%= career.getMail() %>" /></td></tr>
				<% if (career.getUserId() != 0){ %>
				<tr><td></td><td></td></tr>
				<tr><td>*Change Password: </td><td><input type="password" name="password" value="" /></td></tr>
				<tr><td>*Confirm password: </td><td><input type="password" name="passwordbis" value="" /></td></tr>
				<%}%>
			</table>
			<% if (career.getUserId() != 0){ %>
				<p>* optionnal</p>
			<%}%>

			<input type="hidden" name="id" value="<%= career.getUserId() %>" />
			<input type="hidden" name="action" value="careers_createupdate" />
			<input type="submit" name="button_createupdate" value="Create/Update" />
		</form>
	</p>
	
	
<jsp:include page="admin_generic_post.jsp" ></jsp:include>